<?php

// copyright (c) 2010 Bouncing Ltd, ShopUpgraded
// licence Modified FreeBSD
// http://shopupgraded.com/sites/shopupgraded.com/files/freebsd.txt


  require('includes/application_top.php');
  require('includes/functions/sqlpatch.php');

header('Content-type: text/plain; charset=ISO-8859-1');

$zc_show_progress = 'yes';

if(file_exists(DIR_FS_SQL_CACHE.'/import.lock')){
  die('An import has already beeen run.

Running it again would entirely replace the previous data.
If you are sure you wish to do this then remove the file

'.DIR_FS_SQL_CACHE.'/import.lock');

}

if(!file_exists(DIR_FS_SQL_CACHE.'/su_export_data.sql')){
  die('cannot find '.DIR_FS_SQL_CACHE.'/su_export_data.sql');
}


?>
SQL file found, Import started.

This may take some time. There should be no errors generated during this
process, and your data is perfectly safe.

<?php

flush();


$file = file(DIR_FS_SQL_CACHE.'/su_export_data.sql');

$return = executeSQL($file, DB_DATABASE,DB_PREFIX);

touch(DIR_FS_SQL_CACHE.'/import.lock');

chmod(DIR_FS_SQL_CACHE.'/import.lock', 0400);


echo wordwrap("

Import completed. ". DIR_FS_SQL_CACHE.'/import.lock' ." has been created as a security measure. It is read only and until it is removed this page will not functions. It is highly recommended to remove this page

". __FILE__ ."

and to remove:

". DIR_FS_SQL_CACHE.'/su_export_data.sql' ."

although no Administrative names and/ or passwords have been transferred.");


